package zy20190214;

public class Student {
    private String name;
    private String sex;
    private int age;

    public Student(String name, String sex, int age) {
        this.name = name;
        this.sex = sex;
        this.age = age;
    }

    public String getName() {
        return name;
    }

    public void setName(String name) {
        this.name = name;
    }

    public String getSex() {
        return sex;
    }

    public void setSex(String sex) {
        this.sex = sex;
    }

    public int getAge() {
        return age;
    }

    public void setAge(int age) {
        this.age = age;
    }

    public boolean equals(Student student) {

        /*Student student = (Student) obj;*/

        if(this.name != null && this.name.equals(student.name)
                &&
                this.sex != null && this.sex.equals(student.sex)
                &&
                this.age == student.age){
            return true;
        }

        return false;
    }

}
